From: Sam Reed Date: Thu, 16 Dec 2010 11:20:39 +0000 (+0000) Subject: Removing trailing whitespace X-Git-Tag: 1.31.0-rc.0~33271 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=984c692ec4408372cbee33d622e7c78d126a88a1;p=lhc%2Fweb%2Fwiklou.git Removing trailing whitespace --- diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index 26cf53c316..0345e73539 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -13,7 +13,7 @@ * @since 1.17 */ abstract class DatabaseInstaller { - + /** * The Installer object. * @@ -103,7 +103,7 @@ abstract class DatabaseInstaller { * @return Status */ public abstract function getConnection(); - + /** * Create the database and return a Status object indicating success or * failure. @@ -143,7 +143,7 @@ abstract class DatabaseInstaller { * @return String */ public abstract function getLocalSettings(); - + /** * Perform database upgrades * @@ -166,21 +166,21 @@ abstract class DatabaseInstaller { ob_end_flush(); return $ret; } - + /** * Allow DB installers a chance to make last-minute changes before installation * occurs. This happens before setupDatabase() or createTables() is called, but * long after the constructor. Helpful for things like modifying setup steps :) */ public function preInstall() { - + } /** * Allow DB installers a chance to make checks before upgrade. */ public function preUpgrade() { - + } /** @@ -227,7 +227,7 @@ abstract class DatabaseInstaller { public function getReadableName() { return wfMsg( 'config-type-' . $this->getName() ); } - + /** * Get a name=>value map of MW configuration globals that overrides. * DefaultSettings.php @@ -423,12 +423,12 @@ abstract class DatabaseInstaller { $this->setVarsFromRequest( array( 'wgDBuser', 'wgDBpassword', '_SameAccount', '_CreateDBAccount' ) ); - + if ( $this->getVar( '_SameAccount' ) ) { $this->setVar( 'wgDBuser', $this->getVar( '_InstallUser' ) ); $this->setVar( 'wgDBpassword', $this->getVar( '_InstallPassword' ) ); } - + return Status::newGood(); } diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index d8b67b7e7e..5b3d6ca247 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -11,7 +11,7 @@ require_once( dirname(__FILE__) . '/../../maintenance/Maintenance.php' ); /* * Class for handling database updates. Roughly based off of updaters.inc, with * a few improvements :) - * + * * @ingroup Deployment * @since 1.17 */ diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index c1cc4f570a..08763fdc77 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -334,7 +334,7 @@ abstract class Installer { public function restoreLinkPopups() { global $wgExternalLinkTarget; $this->parserOptions->setExternalLinkTarget( $wgExternalLinkTarget ); - } + } /** * TODO: document @@ -349,7 +349,7 @@ abstract class Installer { if( $status->isOK() ) { LBFactory::enableBackend(); } - + return $status; } diff --git a/includes/installer/LocalSettingsGenerator.php b/includes/installer/LocalSettingsGenerator.php index 5cc0e3c270..6c49fbdab6 100644 --- a/includes/installer/LocalSettingsGenerator.php +++ b/includes/installer/LocalSettingsGenerator.php @@ -13,12 +13,12 @@ * @since 1.17 */ class LocalSettingsGenerator { - + private $extensions = array(); private $values = array(); private $dbSettings = ''; private $safeMode = false; - + /** * @var Installer */ @@ -26,7 +26,7 @@ class LocalSettingsGenerator { /** * Constructor. - * + * * @param $installer Installer subclass */ public function __construct( Installer $installer ) { @@ -49,27 +49,27 @@ class LocalSettingsGenerator { ), $db->getGlobalNames() ); - + $unescaped = array( 'wgRightsIcon' ); - $boolItems = array( + $boolItems = array( 'wgEnableEmail', 'wgEnableUserEmail', 'wgEnotifUserTalk', 'wgEnotifWatchlist', 'wgEmailAuthentication', 'wgEnableUploads', 'wgUseInstantCommons' ); - + foreach( $confItems as $c ) { $val = $installer->getVar( $c ); - + if( in_array( $c, $boolItems ) ) { $val = wfBoolToStr( $val ); } - + if ( !in_array( $c, $unescaped ) ) { $val = self::escapePhpString( $val ); } - + $this->values[$c] = $val; } - + $this->dbSettings = $db->getLocalSettings(); $this->safeMode = $installer->getVar( '_SafeMode' ); $this->values['wgEmergencyContact'] = $this->values['wgPasswordSender']; @@ -77,16 +77,16 @@ class LocalSettingsGenerator { /** * Returns the escaped version of a string of php code. - * + * * @param $string String - * + * * @return String */ public static function escapePhpString( $string ) { if ( is_array( $string ) || is_object( $string ) ) { return false; } - + return strtr( $string, array( @@ -103,15 +103,15 @@ class LocalSettingsGenerator { /** * Return the full text of the generated LocalSettings.php file, * including the extensions - * + * * @return String */ public function getText() { $localSettings = $this->getDefaultText(); - + if( count( $this->extensions ) ) { $localSettings .= "\n# The following extensions were automatically enabled:\n"; - + foreach( $this->extensions as $extName ) { $encExtName = self::escapePhpString( $extName ); $localSettings .= "require( \"extensions/$encExtName/$encExtName.php\" );\n"; @@ -135,25 +135,25 @@ class LocalSettingsGenerator { */ private function buildMemcachedServerList() { $servers = $this->values['_MemCachedServers']; - + if( !$servers ) { return 'array()'; } else { $ret = 'array( '; $servers = explode( ',', $servers ); - + foreach( $servers as $srv ) { $srv = trim( $srv ); $ret .= "'$srv', "; } - + return rtrim( $ret, ', ' ) . ' )'; } } /** * @return String - */ + */ private function getDefaultText() { if( !$this->values['wgImageMagickConvertCommand'] ) { $this->values['wgImageMagickConvertCommand'] = '/usr/bin/convert'; @@ -161,17 +161,17 @@ class LocalSettingsGenerator { } else { $magic = ''; } - + if( !$this->values['wgShellLocale'] ) { $this->values['wgShellLocale'] = 'en_US.UTF-8'; $locale = '#'; } else { $locale = ''; } - + $rights = $this->values['wgRightsUrl'] ? '' : '#'; $hashedUploads = $this->safeMode ? '' : '#'; - + switch( $this->values['wgMainCacheType'] ) { case 'anything': case 'db': @@ -183,7 +183,7 @@ class LocalSettingsGenerator { default: $cacheType = 'CACHE_NONE'; } - + $mcservers = $this->buildMemcachedServerList(); return "db->tableName( 'page' ); $this->db->query( "UPDATE $page SET page_random = RAND() WHERE page_random = 0", __METHOD__ ); $rows = $this->db->affectedRows(); @@ -693,7 +691,7 @@ class MysqlUpdater extends DatabaseUpdater { $this->output( "...page_restrictions table already exists.\n" ); return; } - + $this->output( "Creating page_restrictions table..." ); $this->applyPatch( 'patch-page_restrictions.sql' ); $this->applyPatch( 'patch-page_restrictions_sortkey.sql' ); diff --git a/includes/installer/SqliteInstaller.php b/includes/installer/SqliteInstaller.php index d191f6e0cb..9393d83183 100644 --- a/includes/installer/SqliteInstaller.php +++ b/includes/installer/SqliteInstaller.php @@ -5,7 +5,7 @@ * @file * @ingroup Deployment */ - + /** * Class for setting up the MediaWiki database using SQLLite. * @@ -13,7 +13,7 @@ * @since 1.17 */ class SqliteInstaller extends DatabaseInstaller { - + protected $globalNames = array( 'wgDBname', 'wgSQLiteDataDir', @@ -173,4 +173,4 @@ class SqliteInstaller extends DatabaseInstaller { "# SQLite-specific settings \$wgSQLiteDataDir = \"{$dir}\";"; } -} \ No newline at end of file +} diff --git a/includes/installer/SqliteUpdater.php b/includes/installer/SqliteUpdater.php index 92c9a008a7..de49ffea75 100644 --- a/includes/installer/SqliteUpdater.php +++ b/includes/installer/SqliteUpdater.php @@ -5,15 +5,15 @@ * @file * @ingroup Deployment */ - + /** * Class for handling updates to Sqlite databases. - * + * * @ingroup Deployment * @since 1.17 */ class SqliteUpdater extends DatabaseUpdater { - + protected function getCoreUpdateList() { return array( // 1.14 diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 474b019fe3..eddc0fc6d6 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -103,7 +103,7 @@ class WebInstaller extends CoreInstaller { // Add parser hook for WebInstaller_Complete global $wgParser; - $wgParser->setHook( 'downloadlink', array( $this, 'downloadLinkHook' ) ); + $wgParser->setHook( 'downloadlink', array( $this, 'downloadLinkHook' ) ); } /** @@ -598,8 +598,7 @@ class WebInstaller extends CoreInstaller { $text = wfMsgReal( $msg, $args, false, false, false ); $html = htmlspecialchars( $text ); $html = $this->parse( $text, true ); - - + return "
\n" . "" . wfMsgHtml( 'config-help' ) . "\n" . "" . $html . "\n" . @@ -921,12 +920,12 @@ class WebInstaller extends CoreInstaller { } public function downloadLinkHook( $text, $attribs, $parser ) { - $img = Html::element( 'img', array( + $img = Html::element( 'img', array( 'src' => '../skins/common/images/download-32.png', 'width' => '32', 'height' => '32', ) ); - $anchor = Html::rawElement( 'a', + $anchor = Html::rawElement( 'a', array( 'href' => $this->getURL( array( 'localsettings' => 1 ) ) ), $img . ' ' . wfMsgHtml( 'config-download-localsettings' ) ); return Html::rawElement( 'div', array( 'class' => 'config-download-link' ), $anchor ); diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 16fe6265ec..54c18f39f4 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -20,9 +20,9 @@ abstract class WebInstallerPage { * @var WebInstaller */ public $parent; - + public abstract function execute(); - + /** * Constructor. * @@ -52,17 +52,17 @@ abstract class WebInstallerPage { public function endForm( $continue = 'continue', $back = 'back' ) { $s = "
\n"; $id = $this->getId(); - + if ( $id === false ) { $s .= Html::hidden( 'lastPage', $this->parent->request->getVal( 'lastPage' ) ); } - + if ( $continue ) { // Fake submit button for enter keypress (bug 26267) $s .= Xml::submitButton( wfMsg( "config-$continue" ), array( 'name' => "enter-$continue", 'style' => 'visibility:hidden;overflow:hidden;width:1px;margin:0' ) ) . "\n"; } - + if ( $back ) { $s .= Xml::submitButton( wfMsg( "config-$back" ), array( @@ -70,7 +70,7 @@ abstract class WebInstallerPage { 'tabindex' => $this->parent->nextTabIndex() ) ) . "\n"; } - + if ( $continue ) { $s .= Xml::submitButton( wfMsg( "config-$continue" ), array( @@ -78,7 +78,7 @@ abstract class WebInstallerPage { 'tabindex' => $this->parent->nextTabIndex(), ) ) . "\n"; } - + $s .= "
\n"; $this->addHTML( $s ); } @@ -117,7 +117,7 @@ abstract class WebInstallerPage { } class WebInstaller_Language extends WebInstallerPage { - + public function execute() { global $wgLang; $r = $this->parent->request; @@ -192,7 +192,7 @@ class WebInstaller_Language extends WebInstallerPage { $s .= "\n\n"; return $this->parent->label( $label, $name, $s ); } - + } class WebInstaller_ExistingWiki extends WebInstallerPage { @@ -206,7 +206,7 @@ class WebInstaller_ExistingWiki extends WebInstallerPage { // Check if the upgrade key supplied to the user has appeared in LocalSettings.php if ( $vars['wgUpgradeKey'] !== false && $this->getVar( '_UpgradeKeySupplied' ) - && $this->getVar( 'wgUpgradeKey' ) === $vars['wgUpgradeKey'] ) + && $this->getVar( 'wgUpgradeKey' ) === $vars['wgUpgradeKey'] ) { // It's there, so the user is authorized $status = $this->handleExistingUpgrade( $vars ); @@ -228,8 +228,8 @@ class WebInstaller_ExistingWiki extends WebInstallerPage { $this->setVar( '_UpgradeKeySupplied', true ); } $this->startForm(); - $this->addHTML( $this->parent->getInfoBox( - wfMsgNoTrans( 'config-upgrade-key-missing', + $this->addHTML( $this->parent->getInfoBox( + wfMsgNoTrans( 'config-upgrade-key-missing', "
\$wgUpgradeKey = '" . $this->getVar( 'wgUpgradeKey' ) . "';
" ) ) ); $this->endForm( 'continue' ); @@ -237,7 +237,7 @@ class WebInstaller_ExistingWiki extends WebInstallerPage { } // If there is an upgrade key, but it wasn't supplied, prompt the user to enter it - + $r = $this->parent->request; if ( $r->wasPosted() ) { $key = $r->getText( 'config_wgUpgradeKey' ); @@ -266,7 +266,7 @@ class WebInstaller_ExistingWiki extends WebInstallerPage { */ protected function showKeyForm() { $this->startForm(); - $this->addHTML( + $this->addHTML( $this->parent->getInfoBox( wfMsgNoTrans( 'config-localsettings-upgrade' ) ). '
' . $this->parent->getTextBox( array( @@ -324,7 +324,7 @@ class WebInstaller_ExistingWiki extends WebInstallerPage { $status = $installer->getConnection(); if ( !$status->isOK() ) { // Adjust the error message to explain things correctly - $status->replaceMessage( 'config-connection-error', + $status->replaceMessage( 'config-connection-error', 'config-localsettings-connection-error' ); return $status; } @@ -336,7 +336,7 @@ class WebInstaller_ExistingWiki extends WebInstallerPage { } class WebInstaller_Welcome extends WebInstallerPage { - + public function execute() { if ( $this->parent->request->wasPosted() ) { if ( $this->getVar( '_Environment' ) ) { @@ -352,11 +352,11 @@ class WebInstaller_Welcome extends WebInstallerPage { $this->endForm(); } } - + } class WebInstaller_DBConnect extends WebInstallerPage { - + public function execute() { if ( $this->getVar( '_ExistingDBSettings' ) ) { return 'skip'; @@ -428,11 +428,11 @@ class WebInstaller_DBConnect extends WebInstallerPage { } return $installer->submitConnectForm(); } - + } class WebInstaller_Upgrade extends WebInstallerPage { - + public function execute() { if ( $this->getVar( '_UpgradeDone' ) ) { // Allow regeneration of LocalSettings.php, unless we are working @@ -505,11 +505,11 @@ class WebInstaller_Upgrade extends WebInstallerPage { $this->parent->restoreLinkPopups(); $this->endForm( $regenerate ? 'regenerate' : false, false ); } - + } class WebInstaller_DBSettings extends WebInstallerPage { - + public function execute() { $installer = $this->parent->getDBInstaller( $this->getVar( 'wgDBtype' ) ); @@ -538,7 +538,7 @@ class WebInstaller_DBSettings extends WebInstallerPage { } class WebInstaller_Name extends WebInstallerPage { - + public function execute() { $r = $this->parent->request; if ( $r->wasPosted() ) { @@ -576,7 +576,7 @@ class WebInstaller_Name extends WebInstallerPage { 'var' => 'wgMetaNamespace', 'label' => '', //TODO: Needs a label? 'attribs' => array( 'readonly' => 'readonly', 'class' => 'enabledByOther' ), - + ) ) . $this->getFieldSetStart( 'config-admin-box' ) . $this->parent->getTextBox( array( @@ -706,11 +706,11 @@ class WebInstaller_Name extends WebInstallerPage { } return $retVal; } - + } class WebInstaller_Options extends WebInstallerPage { - + public function execute() { if ( $this->getVar( '_SkipOptional' ) == 'skip' ) { return 'skip'; @@ -985,7 +985,7 @@ class WebInstaller_Options extends WebInstallerPage { $this->parent->setVar( '_Extensions', $extsToInstall ); return true; } - + } class WebInstaller_Install extends WebInstallerPage { @@ -1028,11 +1028,11 @@ class WebInstaller_Install extends WebInstallerPage { $this->parent->showStatusBox( $status ); } } - + } class WebInstaller_Complete extends WebInstallerPage { - + public function execute() { // Pop up a dialog box, to make it difficult for the user to forget // to download the file @@ -1058,7 +1058,7 @@ class WebInstaller_Complete extends WebInstallerPage { } class WebInstaller_Restart extends WebInstallerPage { - + public function execute() { $r = $this->parent->request; if ( $r->wasPosted() ) { @@ -1076,11 +1076,11 @@ class WebInstaller_Restart extends WebInstallerPage { $this->addHTML( $s ); $this->endForm( 'restart' ); } - + } abstract class WebInstaller_Document extends WebInstallerPage { - + protected abstract function getFileName(); public function execute() { @@ -1123,7 +1123,7 @@ abstract class WebInstaller_Document extends WebInstallerPage { return '[http://www.mediawiki.org/wiki/Manual:' . $matches[1] . ' ' . $matches[1] . ']'; } - + } class WebInstaller_Readme extends WebInstaller_Document {